package com.sansan.qiangji.controller.early;

import com.sansan.qiangji.form.early.EarlyWarningListForm;
import com.sansan.qiangji.realize.early.EarlyWarningReal;
import com.sansan.qiangji.resultVO.ResultVO;
import com.sansan.qiangji.utils.ResultVOUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @author zhaobc
 * @description
 * @date 2020-11-13
 */
@CrossOrigin()
@RestController
@RequestMapping("/earlyWarning")
@Slf4j
public class EarlyWarningController {

    @Autowired
    private EarlyWarningReal earlyWarningReal;

    @PostMapping("/getEarlyWarningList")
    public ResultVO<Object> getEarlyWarningList(@Valid @RequestBody EarlyWarningListForm listForm){
        return ResultVOUtil.success(earlyWarningReal.getEarlyWarningList(listForm));
    }
}
